<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>下属组织添加页面</title>
  <link rel="stylesheet" href="../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../yl/style.css" />
  <link rel="stylesheet" href="../../yl/mobile.css" />
  <link rel="stylesheet" href="../../yl/easyui.css" />
  <link rel="stylesheet" href="../../yl/icon.css" />
  <style>
    .full-width-container {
      width: 100vw;
      margin-left: -20px;
      padding: 20px;
      box-sizing: border-box;
    }

    /* 容器基础样式 */
    .dia_y {
      width: 50%;
      margin: 1%;
      height: 400px;
      overflow-y: auto;
      overflow-x: hidden;
      position: relative;
      /* border: 1px solid #ccc; /* 加上边框更贴近示例 */
      border-radius: 4px;
    }

    .dia_z {
      /* border: 2px solid #ccc; */
      width: 50%;
      margin: 1%;
      height: 400px;
      overflow-y: auto;
      overflow-x: hidden;
      position: relative;
      /* 为子元素固定定位提供参考 */
    }

    .sticky-input {
      position: sticky;
      top: 0;
      /* 固定在容器顶部 */
      background: #fff;
      /* 背景色与容器一致 */
      z-index: 10;
      /* 确保输入框在树组件上方 */
      padding: 10px 0;
      /* 保持与原布局一致的间距 */
      border-bottom: 1px solid #eee;
      /* 可选：添加分隔线 */
    }

    .scroll-content {
      padding-top: 10px;
      /* 为固定输入框留出空间 */
      height: calc(100% - 50px);
      /* 滚动内容区域高度 */
    }

    /* 顶部统计栏 */
    .xuche {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px 15px;
      background-color: #f5f7fa;
      border-bottom: 1px solid #e4e7ed;
    }

    /* 多选框列表区域 */
    .checkbox-grid {
      padding: 10px 15px;
    }

    /* 调整多选框样式，让每个选项垂直分布更合理 */
    .el-checkbox {
      display: block;
      margin-bottom: 8px;
    }

    /* 滚动条样式（可选，让滚动条更美观） */
    .dia_y::-webkit-scrollbar {
      width: 6px;
    }

    .dia_y::-webkit-scrollbar-thumb {
      background-color: #c0c4cc;
      border-radius: 3px;
    }

    .dia_y::-webkit-scrollbar-track {
      background-color: #f5f7fa;
    }
  </style>
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>

    </header>

    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'north_organization', 'form': 'dataForm','primary_key':'Organization_SerialNumber' })">

      <div class="yl-main">
        <el-dialog v-model="dialogFormVisible" title="下属组织" width="800">
          <div style="display: flex;justify-content: center;">
            <div class="dia_z">
              <!-- 固定的输入框 -->
              <div class="sticky-input">
                <el-input style="width: 95%;" placeholder="输入关键字进行过滤" v-model="filterText">
                </el-input>
              </div>

              <!-- 滚动内容区域 -->
              <div class="scroll-content">
                <el-tree class="filter-tree" :data="treeData"
                  :props="{ children: 'children', label: 'Party_Organization_Name' }" default-expand-all
                  :filter-node-method="filterNode" @node-click="handleNodeClick" ref="tree">
                </el-tree>
              </div>
            </div>
            <div class="dia_y">
              <div class="checkbox-container">
                <!-- 顶部已选统计和清空按钮 -->
                <div class="xuche">
                  <div>已选中&nbsp;{{ selectedCount }}&nbsp;个</div>
                  <div><el-button type="primary" icon="close" @click="clearAll">清空</el-button></div>
                </div>
                <!-- 多选框列表 - 修改为显示党组织 -->
                <div class="checkbox-grid">
                  <el-checkbox v-for="(option, index) in selectedOrganizations" :key="index" v-model="option.checked"
                    @change="handleCheckboxChange(option)">
                    {{ option.Party_Organization_Name }}
                  </el-checkbox>
                </div>
              </div>
            </div>
          </div>
          <template #footer>
            <div class="dialog-footer">
              <el-button type="primary" @click="dialogFormVisible = false">
                确认
              </el-button>
            </div>
          </template>
        </el-dialog>

        <header>
          <div class="m-toolbar panel-header panel-header-noborder " style="margin-top: 30px;">
            <div class="m-title">下属组织信息</div>
          </div>
        </header>
        <div id="ChildTable">

        

          <el-button type="primary" style="margin-top: 20px; width: 120px;" @click="xin">新增下属组织</el-button>
         
          <el-table :data="selectedOrganizationsDisplay" border style="width: 100%;margin-top: 20px;">
            <el-table-column prop="Party_Organization_SerialNumber" label="组织编号" align="center"></el-table-column>
            <el-table-column prop="Party_Organization_Name" label="组织名称" align="center"></el-table-column>
            <el-table-column prop="Establishment_Date" label="成立日期" align="center"></el-table-column>
          </el-table>
        </div>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit2" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>

<script src="../../utils/compressor.js"></script>
<script src="../../utils/utils.js"></script>
<script src="../../utils/wangeditor.js"></script>
<script src="../../config/config.js"></script>
<script src="../../utils/mixins.js"></script>
<script src="../../yl/vue.js"></script>
<script src="../../utils/ID_Validity.js"></script>
<script src="../../yl/index.js"></script>
<script src="../../yl/zh-cn.mjs"></script>
<script src="../../yl/index.iife.min.js"></script>
<script src="../../yl/jquery.min.js"></script>
<script src="../../utils/jquery.cookie.js"></script>
<script src="../../yl/jquery.easyui.min.js"></script>
<script src="../../yl/jquery.easyui.mobile.js"></script>
<script src="../../yl/moment.min.js"></script>
<script src="../../api/request.js"></script>
<script src="./js/memberAdd.js"></script>

</html>